<?php
/**
 * @package    Joomla.Tutorials
 * @subpackage Components
 * @link http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_1
 * @license    GNU/GPL
*/
 
// no direct access
 
defined( '_JEXEC' ) or die( 'Restricted access' );
 
jimport( 'joomla.application.component.view');
 
/**
 * HTML View class for the HelloWorld Component
 *
 * @package    HelloWorld
 */
 
 
class wotclanViewwotclan extends JView
{
    function display($tpl = null)
    {
        
    if (JFactory::getUser()->authorise('core.add', 'com_wotclan')) 
    {
        
		jimport( 'joomla.environment.request' );

       	$document = JFactory::getDocument();

		JHtml::_('behavior.formvalidation');
		//JHtml::_('bootstrap.framework');
		//JHtml::_('jquery.framework');
        $app	= JFactory::getApplication();
		$params	= $app->getParams('com_wotclan');

		// Load the parameters.
		//$this->setState('params', $params);

        //JFactory::getLanguage()->load('com_wotclan');
        $language = JFactory::getLanguage();
        $language->load('com_wotclan');
        $greeting = 'COM_WOTCLAN_GREETING';
        $this->assignRef( 'greeting', JText::_('COM_WOTCLAN_GREETING') );
 
        parent::display($tpl);
        echo JText::_('COM_WOTCLAN_INTRO');
        echo "<hr><h1>".JText::_('COM_WOTCLAN_UPLOAD_REPLAYS')."</h1>";
        echo '<form name="upload" action="?view=upload" method="post"
enctype="multipart/form-data">
<label for="file">'.JText::_('COM_WOTCLAN_FILE').':</label>

<input type="file" name="file_upload" id="file">
<input type="submit" name="submit" value="Submit">
<input type="checkbox" name="notshare"> ne pas partager




</form>
';
  echo '
        



<br> Ou un archive de vos replays : (créer un archive .zip qui comprend vos fichier .wotreplay directemetn 
dans l\'archive, sans aucun répertoire). 
<form name="upload" action="?view=batchupload&notshare=true" method="post"
enctype="multipart/form-data">
<label for="file">Zip file:</label>

<input type="file" name="file_upload" id="file">

<input type="submit" name="submit" value="Submit">
<br>


</form>
'; // TODO : MOT EXACT EST A AJOUTER DANS LE view=search
echo "<br>Rechercher un joueur <form name='player' action='?view=search' method='post' enctype='multipart/form-data'>
<input type='text' name='user' id='user'><input type='checkbox' name='TOP'>Top Tier seulement <input type='checkbox' name='motexact'> Mot exact<br>
<input type='submit' name='submit' value='Submit'>
</form>

";
echo "<br>Rechercher un clan <form name='clan' action='?view=search' method='post' enctype='multipart/form-data'>
<input type='text' name='clan' id='user'><br>
<input type='submit' name='submit' value='Submit'>
</form>

";

//echo "<br><form><textarea rows='40' cols='50' name='team' action='?view=search' method='post' enctype='multipart/form-data'></textarea></form>";
//
//echo '<div id="viewerct"><script type="text/javascript">
//	<!--
//	var mv_width = 675;
//	var mv_height = 300;
//	var mv_background_color = "#000000";
//	var mv_background_img = "";
//	var mv_text_color = "#FFFFFF";
//	var mv_text_size = 12;
//	var mv_see_rooms = 1;
	//-->
//	</script>
//	<script type="text/javascript" src="http://www.server-mumble.com/jsviewer.form?s=32"></script></div>';
    } else {
    		$greeting = "Vous n'avez pas acces a cette section!";
        $this->assignRef( 'greeting', $greeting );
 
        parent::display($tpl);
    		
    }
    }
}
